package com.ls.aop.cglib;

import org.mockito.cglib.proxy.Enhancer;

import com.ls.aop.jdk.RealSubject;
import com.ls.aop.jdk.Subject;

public class CglibClient {

	public static void main(String[] args) {
		Enhancer hancer = new Enhancer();
		hancer.setSuperclass(RealSubject.class);
		hancer.setCallback(new MyCglibIntercepter());
		Subject sub = (Subject)hancer.create();
		sub.m1();
	}
}
